package com.genghis.ptas.security.service;

import com.genghis.core.page.entity.Page;
import com.genghis.core.page.entity.PageParameter;
import com.genghis.ptas.security.entity.User;
import com.genghis.ptas.security.entity.UserBaseInfo;
import org.xml.sax.SAXException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.xpath.XPathExpressionException;
import java.io.IOException;

/**
 * 类的描述信息
 *
 * @author chenl
 * @version 1.0.1
 */
public interface UserService {

    Page<User> findUserPageList(PageParameter pageParameter, User user);

    User findUserAllInfoById(int id);

    User findUserByLoginName(String loginName);

    Boolean checkRepeatLoginName(String loginName, String oldName);

    Boolean checkRepeatUserName(String userName, String oldName);

    int addUser(User user);

    void editUser(User user);

    void editUserBaseInfo(UserBaseInfo userBaseInfo);

    void delUsers(String userIds[]);

    UserBaseInfo findUserBaseInfoByUserId(int userId);

    User findFullUserByUserLoginName(String loginName);

    void upPhoto(HttpServletRequest request, String upPhoto) throws ServletException, IOException, ParserConfigurationException, SAXException, XPathExpressionException;

    boolean checkUserPassword(String password);

    void editUserPassWord(String password, String loginName);

    String returnIndexPage(HttpServletRequest request);

    Boolean forgetPassword(String loginName,String  question);

    void resetPassword(String loginName, String password);
}
